home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- function wallizq()
- {
- return dx < 0 && mapa.hitTest(_X,_Y,true);
- }
- function wallder()
- {
- return dx > 0 && mapa.hitTest(_X,_Y,true);
- }
- function suelo()
- {
- return _Y >= 194;
- }
- _visible = this.hitTest(_root.mascara);
- _X = _X - heroe.scrollspeed;
- if(mover)
- {
- this.gotoAndStop("fly");
- if(this.hotzone.hitTest(heroe.sprite.hotzone))
- {
- !dy ? (heroe.damage = 6) : (heroe.damage = 10);
- heroe.hitted = true;
- }
- _X = _X + dx;
- _Y = _Y + dy;
- if(dy != 0)
- {
- if(heroe._x > _X && heroe.horizontal > 0)
- {
- dx += 2;
- }
- if(heroe._x < _X && heroe.horizontal < 0)
- {
- dx -= 2;
- }
- }
- if(wallizq() || wallder() || suelo())
- {
- mover = false;
- this.gotoAndStop("crash");
- if(dy != 0)
- {
- x = new Sound();
- x.attachSound("freezeattack");
- x.start();
- }
- }
- if(dy != 0)
- {
- i++;
- shObj = {_x:_X,_y:_Y,dx:0,dy:2,mover:true};
- _root.shineNoloop.duplicateMovieClip("shineNoloop" + i,10 + i,shObj);
- }
- }
- if(borrar)
- {
- this.removeMovieClip();
- borrar = false;
- }
- }
-